function ArkMotion(cssPath) {
	if(cssPath == null || cssPath == '' || typeof cssPath != 'string') {
		console.log(typeof cssPath);
		console.warn('未加载正确的css文件!');
		return;
	}
	init();
	function init() {
		window.onload = function() {
			
		}
		// 增加prepend方法
		Node.prototype.prependChild = function (newNode){
			this.insertBefore(newNode,this.firstChild);
		}
		// 加载CSS文件
		dynamicLoadingCss(cssPath);
		// 加载动效DOM
		dynamicLoadingDOM(cssPath);
	}
	
	// 增加选择器
	function getDOM(selector) {
		if(selector.startsWith('.')) {
			return document.getElementsByClassName(selector.substr(1));
		}else if(selector.startsWith('#')) {
			return document.getElementById(selector.substr(1));
		}else {
			return document.getElementsByTagName(selector);
		}
	}
	
	function prependChildNode(root, child, className) {
		let rootDOM = null;
		if(root.startsWith('#')) {
			rootDOM = getDOM(root);
		}else {
			rootDOM = getDOM(root)[0];
		}
		
		let childDOM = document.createElement(child);
		childDOM.className = className;
		rootDOM.prependChild(childDOM);
	}
	
	function appendChildNode(root, child, className) {
		let rootDOM = null;
		if(!root.startsWith('.') && !root.startsWith('#')) {
			rootDOM = getDOM(root)[0];
		}else {
			rootDOM = getDOM(root);
		}
		
		let childDOM = document.createElement(child);
		childDOM.className = className;
		rootDOM.appendChild(childDOM);
	}	
	
	function dynamicLoadingCss(path) {
		let head = document.getElementsByTagName('head')[0];
		let link = document.createElement('link');
		link.href = path;
		link.rel = 'stylesheet';
		link.type = 'text/css';
		head.appendChild(link);
	}
	
	function dynamicLoadingDOM(cssPath) {
		prependChildNode('body', 'div', 'arknights-motion-content');
		if(cssPath.indexOf('Kazimierz-Major') != -1) {
			prependChildNode('.arknights-motion-content', 'div', 'ark-bg');
			prependChildNode('.ark-bg', 'div', 'ark-bluebg');
			prependChildNode('.ark-bluebg', 'div', 'ark-pinkbg');
		}
	}
}